-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Move AutoDirectionalNavigation to bevy_ui
#22309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
+762
−756
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
brianreavis
commented
Dec 29, 2025
- Fixes Regression: bevy_winit now pulls in all of bevy_ui #22305
Member
|
That makes far more sense to me. Please bother me when CI is passing and I'll get this merged :) |
Contributor
Author
|
This PR will need rebuilt now that this was just merged: Other future conflicts: |
This was referenced Jan 1, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 6, 2026
…eature flag needed (#22340) # Objective - Fixes #22305 - Avoid feature flagging ## Solution Taking inspiration from #22309 and building off of #22333, this moves the auto directional navigation to `bevy_ui` and creates a new system parameter to be used when including automatic navigation. - directional_navigation.rs of `bevy_input_focus` still contains the `DirectionalNavigation` system parameter, but it now only contains logic to do manual navigation. The `DirectionalNavigationPlugin` is still there, as well as the manual edge map. - I separated out some code from directional_navigation.rs into two separate files: 1) directional_navigation.rs in `bevy_ui` which contains the automatic navigation code. There is a new system parameter now, `AutoDirectionalNavigator`, that wraps the `DirectionalNavigation` system parameter and does automatic navigation if manual navigation fails. 2) navigator.rs which contains some structs and functions that are used by both the automatic navigation system and the manual navigation code in directional_navigation.rs. This particular refactoring wasn’t particularly necessary, but I feel like the code is little more cleaner for it… I can revert this change if desired If you think a feature is better for this, then let me know whether #22333 should be considered instead. If this gets merged, I’ll open up a pull request against `release-0.18` to update the release notes, basically saying that users who want to leverage `AutoDirectionalNavigation` need to use the `AutoDirectionalNavigator` instead of the existing `DirectionalNavigation` system param. ## Testing To ensure no regressions, I tested the directional navigation examples and both work as they did before. `cargo run --example directional_navigation` - uses the existing `DirectionalNavigation` system parameter `cargo run --example auto_directional_navigation` - uses the new `AutoDirectionalNavigator` system parameter
cart
pushed a commit
that referenced
this pull request
Jan 8, 2026
…eature flag needed (#22340) - Fixes #22305 - Avoid feature flagging Taking inspiration from #22309 and building off of #22333, this moves the auto directional navigation to `bevy_ui` and creates a new system parameter to be used when including automatic navigation. - directional_navigation.rs of `bevy_input_focus` still contains the `DirectionalNavigation` system parameter, but it now only contains logic to do manual navigation. The `DirectionalNavigationPlugin` is still there, as well as the manual edge map. - I separated out some code from directional_navigation.rs into two separate files: 1) directional_navigation.rs in `bevy_ui` which contains the automatic navigation code. There is a new system parameter now, `AutoDirectionalNavigator`, that wraps the `DirectionalNavigation` system parameter and does automatic navigation if manual navigation fails. 2) navigator.rs which contains some structs and functions that are used by both the automatic navigation system and the manual navigation code in directional_navigation.rs. This particular refactoring wasn’t particularly necessary, but I feel like the code is little more cleaner for it… I can revert this change if desired If you think a feature is better for this, then let me know whether If this gets merged, I’ll open up a pull request against `release-0.18` to update the release notes, basically saying that users who want to leverage `AutoDirectionalNavigation` need to use the `AutoDirectionalNavigator` instead of the existing `DirectionalNavigation` system param. To ensure no regressions, I tested the directional navigation examples and both work as they did before. `cargo run --example directional_navigation` - uses the existing `DirectionalNavigation` system parameter `cargo run --example auto_directional_navigation` - uses the new `AutoDirectionalNavigator` system parameter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-UI
Graphical user interfaces, styles, layouts, and widgets
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
P-Regression
Functionality that used to work but no longer does. Add a test for this!
S-Adopt-Me
The original PR author has no intent to complete this work. Pick me up!
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.